#include <stdio.h>

int main()
{
	int n = 0x12345678;
	char *ptr = (char *)&n;

	// output is 0x78, 0x56, 0x34, 0x12 means little endian
	int count = sizeof(int)/sizeof(char);
	for (int i = 0; i != count; i++) {
		printf("0x%X\n", *ptr);
		ptr++;
	}
}
